import 'package:chatbot/shixian_moxing.dart';

class ChuangzuoLiebiao {
  late int code;
  late ShujuLei shuju;
  late String xiaoxi;

  static ChuangzuoLiebiao fromMap(Map<String, dynamic> map) {
    ChuangzuoLiebiao creatorListModelBean = ChuangzuoLiebiao();
    creatorListModelBean.code = map['code'];
    creatorListModelBean.shuju = ShujuLei.fromMap(map['data']);
    creatorListModelBean.xiaoxi = map['message'];
    return creatorListModelBean;
  }

  Map toJson() => {
        "code": code,
        "data": shuju,
        "message": xiaoxi,
      };
}

class ShujuLei {
  late bool isLastPage;
  late List<Chuangzuo> list;

  late int total;

  static ShujuLei fromMap(Map<String, dynamic> map) {
    ShujuLei dataBean = ShujuLei();
    dataBean.isLastPage = map['isLastPage'];
    dataBean.list = []
      ..addAll((map['list'] as List ?? []).map((o) => Chuangzuo.fromMap(o)));
    dataBean.total = map['total'];
    return dataBean;
  }

  Map toJson() => {
        "isLastPage": isLastPage,
        "list": list,
        "total": total,
      };
}
